Skip to content

Improve UI phase2#419

Merged
grunch merged 5 commits intomainfrom
improve-ui-phase2
Feb 5, 2026
Merged

Improve UI phase2#419
grunch merged 5 commits intomainfrom
improve-ui-phase2

Conversation

@Catrya
Copy link
Member

@Catrya Catrya commented Jan 26, 2026

conslidate purple and red color

Summary by CodeRabbit

  • Documentation

    • Updated design system documentation with refined color palette phases and consolidation status.
  • Style

    • Added new color tokens to the design system for improved consistency.
    • Removed deprecated color tokens from the palette.
    • Updated color usage across message bubbles, premium features, currency display, notification settings, and other UI components.

  - Remove red2 (duplicate of statusError)
  - Replace sellColor with red1 across 5 files
  - Remove purpleAccent (#764BA2)
  - Replace with purpleButton (#7856AF) across 6 files
  - Consolidate 10 instances to unified purple color
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 26, 2026

Walkthrough

This pull request implements Phase 2 and 2b of the app's color system consolidation, removing deprecated color tokens (red2, purpleAccent) and introducing new ones (red1, purpleButton, statusError) in the core theme. Widget files across chat, disputes, and order features are updated to reference the new purpleButton token. Design system documentation is updated to reflect completion of these phases and remaining planned work.

Changes

Cohort / File(s) Summary
Design System Documentation
docs/architecture/DESIGN_SYSTEM.md
Comprehensive update documenting Phase 2 and 2b color refactor completion, including red strategy refinement (red1, statusError, sellColor retained), purple consolidation (purpleAccent removed, purpleButton introduced), migration details, decision log expansion, and final color palette targets.
Core Theme Constants
lib/core/app_theme.dart
Added three new public color constants (red1, purpleButton, statusError) and removed two deprecated ones (red2, purpleAccent) to align with consolidated color palette strategy.
Chat & Messaging Widgets
lib/features/chat/widgets/message_bubble.dart, lib/features/disputes/widgets/dispute_message_bubble.dart
Updated message bubble background colors from purpleAccent to purpleButton across encrypted messages and text message rendering paths.
Order Feature Widgets
lib/features/order/widgets/currency_section.dart, lib/features/order/widgets/premium_section.dart, lib/features/order/widgets/price_type_section.dart
Replaced purpleAccent with purpleButton in icon background colors and switch/slider active track colors across three order-related components.
Settings
lib/features/settings/notification_settings_screen.dart
Updated switch configurations to use activeTrackColor instead of activeColor for consistent color behavior.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • grunch
  • chebizarro

Poem

🐰 Colors blend and consolidate so neat,
Purple buttons hop to rhythm's beat,
Red and green in harmony align,
The palette's consolidated design,
A cleaner theme, from tip to toe! 🎨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The title 'Improve UI phase2' is vague and generic, using non-descriptive terms that do not convey meaningful information about the changeset. Replace with a specific title reflecting the main changes, such as 'Consolidate purple and red color tokens in theme' or 'Migrate purpleAccent to purpleButton and refine red color strategy'.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch improve-ui-phase2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@docs/architecture/DESIGN_SYSTEM.md`:
- Around line 351-354: Update the Goals section text to remove the contradictory
"deferred" phrasing by explicitly stating that purple consolidation was moved to
Phase 2b and is now completed; locate the "Goals:" block (the bulleted items
including "Consolidate 3 red variants → 2 red variants" and the purple
consolidation line) and replace the "⏸️ Purple consolidation deferred (out of
scope for Phase 2)" line with wording such as "✔️ Purple consolidation moved to
Phase 2b and completed" so the document no longer contradicts the Phase 2b
completion status.

Comment on lines 351 to 354
**Goals:**
1. Consolidate 3 red variants → 2 red variants (or justify keeping 3)
2. Clarify purple usage or consolidate to 1 purple
3. Document clear usage guidelines for each color

#### Work Required
1. ✅ Consolidate 3 red variants → 2 red variants with clear semantics
2. ⏸️ Purple consolidation deferred (out of scope for Phase 2)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Clarify Phase 2 vs Phase 2b wording to avoid contradiction.

Line 353 says purple consolidation was deferred, but later the doc marks Phase 2b as complete. Consider updating this line to reflect that purple moved to Phase 2b and is now done.

✏️ Suggested wording tweak
-2. ⏸️ Purple consolidation deferred (out of scope for Phase 2)
+2. ✅ Purple consolidation completed in Phase 2b (see Phase 2b section)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Goals:**
1. Consolidate 3 red variants → 2 red variants (or justify keeping 3)
2. Clarify purple usage or consolidate to 1 purple
3. Document clear usage guidelines for each color
#### Work Required
1. ✅ Consolidate 3 red variants → 2 red variants with clear semantics
2. ⏸️ Purple consolidation deferred (out of scope for Phase 2)
**Goals:**
1. ✅ Consolidate 3 red variants → 2 red variants with clear semantics
2. ✅ Purple consolidation completed in Phase 2b (see Phase 2b section)
🤖 Prompt for AI Agents
In `@docs/architecture/DESIGN_SYSTEM.md` around lines 351 - 354, Update the Goals
section text to remove the contradictory "deferred" phrasing by explicitly
stating that purple consolidation was moved to Phase 2b and is now completed;
locate the "Goals:" block (the bulleted items including "Consolidate 3 red
variants → 2 red variants" and the purple consolidation line) and replace the
"⏸️ Purple consolidation deferred (out of scope for Phase 2)" line with wording
such as "✔️ Purple consolidation moved to Phase 2b and completed" so the
document no longer contradicts the Phase 2b completion status.

Copy link
Member

@grunch grunch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Image

Le pedí a una IA que investigue si es buena idea usar texto negro sobre rojo, aquí la respuesta:

1. ¿Texto negro sobre botón rojo es accesible?

Depende del rojo concreto, pero en general es una combinación riesgosa.

  • Con rojo puro brillante (#FF0000) y texto negro, el contraste teórico ronda ~5.25:1, lo que cumple WCAG AA para texto normal.
  • El problema real: casi ningún botón usa rojo puro.
    En la práctica se usan rojos oscuros, desaturados o con gradiente, y ahí el contraste cae por debajo de 4.5:1, fallando accesibilidad.

👉 Conclusión técnica:
Negro sobre rojo puede cumplir en laboratorio, pero falla fácilmente en producción.


2. Impacto específico en personas mayores 👵👴

Sí, puede afectar claramente la lectura, por varios motivos bien documentados:

Cambios visuales con la edad

  • Disminuye la sensibilidad al contraste
  • El cristalino se vuelve más amarillento, lo que reduce la percepción del rojo
  • Más dificultad para distinguir bordes oscuros sobre fondos saturados

Resultado:

El texto negro “se hunde” visualmente en el rojo, sobre todo en pantallas pequeñas y con brillo bajo.

Esto no es solo teoría: en tests de usabilidad, personas mayores tardan más en leer botones rojo+negro que rojo+blanco o rojo+blanco con ícono.


3. ¿Es buena práctica poner texto negro sobre rojo?

📚 Estado de la práctica (UX / accesibilidad)

No es una buena práctica recomendada.
De hecho:

  • Material Design (Google) → rojo con texto blanco
  • Apple HIG → botones destructivos rojo + blanco
  • Gov.uk Design System → rojo oscuro + texto blanco, alto contraste
  • WCAG advisory techniques → evitar texto oscuro sobre colores saturados

No porque “esté prohibido”, sino porque:

  • es frágil al contraste
  • falla con visión envejecida
  • falla con brillo bajo / modo exterior
  • falla con pantallas OLED mal calibradas

4. Problema extra: semántica + legibilidad

El botón rojo suele significar:

  • peligro
  • acción destructiva
  • alto riesgo

Si además:

  • el texto es negro
  • el peso tipográfico no es fuerte

➡️ el usuario percibe urgencia, pero no entiende rápido qué hace
Eso es peligroso en flujos financieros.


5. Recomendaciones concretas (prácticas y seguras)

✅ Mejor opción

  • Texto blanco (#FFFFFF) sobre rojo
  • Contraste ≥ 4.5:1 (ideal ≥ 7:1)
  • Fuente semibold o bold
  • Tamaño mínimo 14–16 px en mobile

✅ Aún mejor

  • Blanco + ícono (↑ vender, ⚠️ riesgo)
  • Bordes claros o sombra suave para separar del fondo

❌ Evitar

  • Negro sobre rojo oscuro
  • Negro sobre rojo con gradiente
  • Tipografía fina
  • Texto pequeño

@AndreaDiazCorreia
Copy link
Member

Por lo que menciona @grunch fue que le baje la opacidad a ese boton, capaz no es necesario tener un solo rojo sino distintos todos segun el uso, lo mismo con los verdes y otros colores y estandarizar mas sus usos

@Catrya Catrya requested a review from grunch February 2, 2026 18:52
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/architecture/DESIGN_SYSTEM.md (1)

1126-1134: ⚠️ Potential issue | 🟡 Minor

Update Section 4.6 to reflect completed purple consolidation.

This section still says “Review in Phase 2” and “Pending Phase 2,” which contradicts Phase 2b completion and the decision log. Update it to show purpleAccent removed and purpleButton finalized.

✏️ Suggested update
-### 4.6 Accent Colors
+### 4.6 Accent Colors

 | Color Name | Hex | RGB | Usage | Status |
 |------------|-----|-----|-------|--------|
-| **Purple Accent** | `#764BA2` | (118, 75, 162) | Accent elements | ⚠️ Review in Phase 2 |
-| **Purple Button** | `#7856AF` | (120, 86, 175) | Submit buttons | ⚠️ Review in Phase 2 |
+| **Purple Button** | `#7856AF` | (120, 86, 175) | Accent elements, submit buttons | ✅ Finalized |

-**Pending Phase 2:**
-- Decide if both purples are needed
-- Document clear usage guidelines if keeping both
-- Consider consolidation to single purple
+**Status:**
+- ✅ `purpleAccent` removed
+- ✅ Consolidated to single purple (`purpleButton`)
🤖 Fix all issues with AI agents
In `@docs/architecture/DESIGN_SYSTEM.md`:
- Around line 1369-1371: The changelog table rows currently have 3 cells while
the header declares 4 columns (Date, Version, Changes, Author), causing markdown
rendering errors; update each row in the changelog (the rows starting with
"2026-01-14", "2026-01-24", "2026-02-02") to include the missing Author cell
(e.g., add a fourth pipe-delimited cell with the author name or a placeholder
like "-"), or alternatively remove the "Author" header to match existing 3-cell
rows so the table columns are consistent.

Copy link
Member

@grunch grunch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

@grunch grunch merged commit 766c899 into main Feb 5, 2026
2 checks passed
@grunch grunch deleted the improve-ui-phase2 branch February 5, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants